Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Objects /
Chapter 7 - View-Related Objects / View-Related Objects Reference
View Port Functions / Retrieving the View Devices That Intersect a View Port


GXGetViewPortViewDevices

You can use the GXGetViewPortViewDevices function to determine all of the view device objects that shapes drawn to a view port can display on.

long GXGetViewPortViewDevices(gxViewPort source, 
                              gxViewDevice list[]);
source
A reference to the view port whose view devices you wish to examine.
list
An array of view device references. On return, contains the references to the view devices that the source view port can draw to.
function result
The number of view device references in the list array.
DESCRIPTION
The GXGetViewPortViewDevices function determines which view devices can display the contents of the source view port, and places a list of references to those view devices in the list parameter. It also returns the number of view devices in the list. The view devices returned are those, in the same view group as the view port, whose clip areas intersect the view port's clip area.

If you set the list parameter to nil, GXGetViewPortViewDevices does not return a list of references; it only returns the number of view device references that would be in the list. Thus, you typically call this function twice: first to get the size of array to allocate for the list parameter, and second to retrieve the list itself.

ERRORS, WARNINGS, AND NOTICES
Errors 
invalid_viewPort_reference 
SEE ALSO
For an example of the use of this function, see Listing 7-7 on page 7-49.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996